<template>
  <el-icon @click="toggleFullScreen"><FullScreen /></el-icon>
</template>

<script setup>
// 进入全屏和退出全屏
const toggleFullScreen = () => {
  if (!document.fullscreenElement) {
    document.documentElement.requestFullscreen()
  } else {
    if (document.exitFullscreen) {
      document.exitFullscreen()
    }
  }
}
</script>

<style>

</style>
